The present invention relates generally to an information processing apparatus and method. For example, the present invention is applicable to magnetic disk apparatus such as hard disk apparatuses for recording video data for example and optical disk apparatuses for recording video data for example. The present invention, by the processing of a recording/reproducing apparatus corresponding to one command, sequentially reproduces files to output the reproduced files and sequentially detects free areas to record files to the detected free areas, thereby shortening the time necessary for dubbing as compared with related-art configurations.
Further, the present invention relates generally to an information processing apparatus, an information processing apparatus control method, an information processing apparatus control program, and a recording medium recording the information processing apparatus control program. For example, the present invention is applicable to hard disk apparatuses an so on for recording video data for example. The present invention is intended to instantaneously output the data in a desired file by storing in memory the data for a predetermined duration of time from a reproduction start position, thereby effectively avoiding waste power dissipation. At the time of reproduction, the present invention stores, in memory, by a predetermined data amount, the data at the start portion of a position which requires to access by a seek operation; during a period in which it is difficult to reproduce data from a disk type recording medium by the seek operation, the stored data are outputted to effectively prevent the access speed by the seek operation from being lowered.
Conventional hard disk apparatuses for use as peripheral devices to personal computers are capable of random access operations. Recently, these hard disk apparatuses are increasingly small in size and high in data recording density. Therefore, various propositions are made for these hard disk apparatuses to be applied to the recording of audio data and video data (hereafter referred to as AV data), thereby applying these hard disk apparatuses to home servers and vehicle equipment.
In these hard disk apparatuses, the data recorded to a hard disk are controlled in a control unit based on a cluster composed of plural sectors by control data recorded in the hard disk and this control is executed by a personal computer for example which is a host apparatus.
Now, referring to FIG. 15, there is shown a block diagram illustrating a hard disk apparatus. A hard disk apparatus 1 is connected to a host apparatus 2 which is one of various video equipment to record AV data outputted from the host apparatus 2 onto a hard disk 3. The host apparatus 2 is a video device in which AV data composed of moving images and/or still images are recorded to a mass-storage recording medium such as a hard disk drive (HDD) 2C and the recorded AV data are held therein; for example, the host apparatus 2 is an electronic still camera.
To the hard disk 3, MS-DOS compliant file system format is applied as shown in FIG. 16. Namely, the hard disk 3 is divided in the information recording surface into the inner peripheral side and the outer peripheral side, the former being allocated to a data area and latter to a system entry area. The data area is fragmented into clusters, to each of which AV data for example are recorded with a data amount of the predetermined number of frames used as a unit.
Further, the hard disk 3 is concentrically divided in the information recording surface into plural zones, each track in each zone being divided by a predetermined length along the circumference into plural sectors. In the hard disk 3 thus sectorized, physical addresses are set by the surface number of the information recording surface, the track numbers continuously allocated from the outer peripheral side of the information recording surface, and the sector numbers identifying the sectors of each track. In addition, user data are controlled in file by the logical addresses which are sequentially set from the outer peripheral side of the information recording surface in correspondence to these physical addresses.
Each logical address is represented in a cluster number with a cluster obtained by collecting plural logical sectors used as a unit. Namely, each logical sector provides an area corresponding to a recording unit of data which is set with the start area (located at the outermost periphery in this case) in the information recording surface defined as sector 0. In this embodiment, one physical sector corresponds to one logical sector, each logical sector number being represented in a relation that logical sector number=the number of sectors in one track×(surface number+the number of surface×track number)+sector number−1. It should be noted that the surface number, track number, and sector number are based on physical address.
In this embodiment, a logical sector is configured so that data of 512 bytes are recorded to one logical sector in terms of user data and one cluster is configured by plural logical sectors. It should be noted that one cluster is generally configured by the number of sectors equal to a power of 2 and is identified by a cluster number which is a serial number starting with 2 which is the beginning of a file area in the data area to which user data are recorded.
In the data area, a cluster number is allocated to each cluster thus set and the data area is accessed on a cluster basis with reference to the cluster number. It should be noted that, in this embodiment, each cluster number is represented in 4-digit hexadecimal notation.
The system entry area is further divided into a boot area, a FAT (Fail Allocation Table) area, and a directory area. To the boot area, the data for defining a disk structure is recorded. To the FAT area and the directory area, the address information and so on necessary for accessing the AV data recorded in the data area are recorded.
To be more specific, the file name of each file recorded to the data area and the cluster number of the start cluster which is the recording start position of each file are recorded to the directory area. To the FAT area, the cluster numbers of the clusters following the start cluster of each file are recorded. This allows the hard disk 3 to detect the addresses of consecutive clusters constituting one file by detecting the start cluster number of the desired file name from the directory area and then sequentially detecting the cluster numbers following the start cluster number from the FAT area.
As shown in FIG. 16, if file 1 is recorded to clusters having cluster numbers 1234h through 1240h in the data area, the code indicative of cluster number 1234h of a first cluster of file 1 is recorded to the directory area and the cluster numbers following this cluster number 1234h are sequentially recorded to the corresponding areas of the FAT area. It should be noted that EOF (End Of File) is identification information indicative of the last cluster of one file.
To be more specific, the directory area records for each file recorded in the data area the file control data for identifying each file recorded in the data area, the file control data having a configuration shown in FIG. 17. Namely, in the file control data, the first 8 bytes are allocated to file name and the next 3 bytes are allocated to extension. The following one byte is allocated to attribute followed by 10 bytes allocated to data for reservation. The next 2 bytes are allocated to recording start time, followed by 2 bytes allocated to recording date, followed by 2 bytes allocated to cluster number which is the start cluster number. The last 4 bytes are allocated to file length.
The FAT area (FIG. 16) records the identification data indicative of the association of clusters, each of which provides a unit in which the data area is controlled. Namely, in the FAT area, cluster addresses are allocated in correspondence with the cluster numbers in the data area and the cluster numbers of the clusters following the cluster addresses are recorded. As shown in FIG. 18, of the codes which are not allocated to these cluster numbers, predetermined codes are allocated to the identification information indicative of a free area, defective cluster, and EOF.
Consequently, the hard disk 3 accesses the FAT area to detect free areas in the data area. Also, the hard disk 3 executes alternative processing with reference to a defective sector. Further, at the time of recording, the hard disk 3 registers a defective sector by retry processing based on write-and-verify operation. Thus, like the file control system to be applied to a personal computer, the hard disk 3 controls the information recording surface on a predetermined block basis.
A servo circuit 4 (FIG. 15) drives a motor (M) 6 under the control of a hard disk control circuit 5 to drive the hard disk 3 at a predetermined rotational speed. Also, the servo circuit 4 drives a motor (M) 8 to cause the magnetic head to perform a seek operation and perform tracking control.
At the time of recording, a read/write data channel section 9 encodes the output data of the hard disk control circuit 5 by a scheme suited to the characteristics of the recording/reproducing system to generate bit-series data under the control of the hard disk control circuit 5, driving the magnetic head on the basis of the generated data. At the time of reading, the read/write data channel section 9 performs a signal processes on the reproduction signal obtained from the magnetic head to generate reproduction data, outputting them to the hard disk control circuit 5.
The hard disk control circuit 5 controls the data stored on the hard disk 3 as directed by an interface control circuit 7 and controls the operation of the servo circuit 4 in accordance with the AV data entered via a buffer memory 10 and, by outputting the AV data to the read/write data channel section 9, records the AV data to a cluster specified by the interface control circuit 7. At the time of reading, the hard disk control circuit 5 controls the operation of the servo circuit 4 to output the data from the read/write data channel section 9 to the buffer memory 10, thereby reproducing the cluster specified by the interface control circuit 7.
An interface control circuit (IF control) 7 is constituted by a SCSI controller, an IDE controller, or an ATA controller for example to configure an input/output circuit for inputting and outputting data and control commands to be transferred with the host apparatus 2. Namely, the interface control circuit 7 receives commands and interprets their parameters to control the operations of the hard disk control circuit 5 and so on. At the time of writing, the interface control circuit 7 outputs the AV data entered from the host apparatus 2 to the hard disk control circuit 5 via the buffer memory 10. On the other hand, at the time of reading, the interface control circuit 7 outputs the AV data received from the hard disk control circuit 5 to the host apparatus 2 via the buffer memory 10.
In response, the host apparatus 2 transmits various commands and so on to the hard disk apparatus 1 as directed by an upper controller on the basis of the processing of a central processing unit (CPU) 2A for which a work area is allocated in a host memory 2B.
In this processing, the central processing unit 2A performs a predetermined processing procedure at the time of power-on sequence to upload the data in the boot area, the FAT area, and the directory area which are the control data recorded in the system entry area of the hard disk 3 to the host memory 2B and transmits various commands having the parameters set with reference to the uploaded data.
Referring to FIG. 19, there is shown the processing procedure for uploading the control data. The hard disk apparatus 1 goes step SP1 to SP2 at the time of power-on sequence for example, in which the host apparatus 2 issues a command for reading the system entry area. In step SP3, the data in the system entry area are reproduced by the hard disk 3 in response to this command and the reproduced data are transmitted to the host apparatus 2. In the related-art system, the data in the system entry area are recorded to the host memory 2B of the host apparatus 2 in step SP4 for use in the issuance of a sequence of read and write commands and then the hard disk apparatus 1 goes to step SP5 to end this processing procedure.
The host apparatus 2 thus sets parameters with reference to the uploaded control data and instructs the hard disk apparatus 1 for access. Namely, to read a desired file for example, the host apparatus 2 sets the start address of this file (the FAT entry number of the directory) and the transfer length in cluster basis of this file as parameters and issues a read command having these parameters. Likewise, at the time of writing, the host apparatus 2 issues a write command to sequentially transmit the data to be recorded.
Referring to FIG. 20, there is shown a flowchart indicative of the write processing to be executed with reference to the control data recorded in the host memory 2B of the host apparatus 2. In this case, the host apparatus 2 goes from step SP11 to step SP12 and searches the control data recorded in the host memory 2B to detect a cluster number (a free cluster address) set with a code indicative of a free area.
When a free cluster address is detected, the host apparatus 2 sets the parameters of this free cluster address and transfer length and issues a write command having these parameters in step SP13. In step SP14, the host apparatus 2 transmits the data to the hard disk apparatus 1 by the specified transfer length to be recorded. In the case of the ATA standard, the transfer length for one command is a sequence of consecutive sectors less than 256 sectors. In step SP15, the hard disk apparatus 1 records the data received in accordance with the write command to the buffer memory 10. In step SP16, the hard disk apparatus 1 sequentially records the data recorded in the buffer memory 10 to the free clusters specified by the host apparatus 2.
When the recording of the data received from the host apparatus 2 has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP17. This interrupt causes the host apparatus 2 to go to step SP18 to determined whether the transfer of the data to be recorded has all been completed. If the decision is NO, the host apparatus 2 returns to step SP12. Thus, the host apparatus 2 repeats the issuance of a write command for a file having an amount of data which cannot be recorded by a single write operation. In response to the repetitive issuance, the hard disk apparatus 1 sequentially records the data to the free clusters specified by the host apparatus 2.
When the transfer of the data to be recorded has all been completed, and the decision in step SP18 is YES, the host apparatus 2 goes to step SP19 to update the contents of the system entry area recorded to the host memory 2B so that these contents correspond to the recording of the file and instructs the hard disk apparatus 1 to update the system entry area. In step SP20, the host apparatus 2 ends this processing procedure.
Referring to FIG. 21, there is shown a flowchart indicative of a processing procedure for reading the AV data recorded as described above with reference to the control data recorded in the host memory 2B of the host apparatus 2. In this case, the host apparatus 2 goes from step SP21 to step SP22 and searches the control data recorded in the host memory 2B to detect the start cluster number of the file to be read from the data in the directory area.
Upon detection of the start cluster number, the host apparatus 2 goes to step SP23 and sets this start cluster address and the transfer length as parameters to issue a read command. In the case of the ATA standard, the transfer length of one command is a sequence of sectors less than 256 sectors. To be more specific, the host apparatus 2 issues a read command having the format shown in FIG. 22. Namely, the command code is set to the first one byte so as to identify each command. Subsequently, addresses are each set to one byte by cluster number, lastly followed by one byte of transfer length.
When a read command is issued from the host apparatus 2 as described above, the hard disk apparatus 1 reads the data specified by this command from the hard disk 3 in step SP24. In step SP25, the hard disk apparatus 1 temporarily stores the retrieved data in the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP26. This interrupt causes the host apparatus 2 to go to step SP27 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data temporally stored from the buffer memory 10 to host apparatus 2.
Receiving the AV data corresponding to one read command, the host apparatus 2 searches the host memory 2B to detect the following cluster address on the basis of link cluster number from the data of the FAT area in step SP28. Further, in step SP29, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
If the decision is NO, the host apparatus 2 returns to step SP23 and sets parameters again on the basis of the address detected in step SP28 and issues a read command. As for a file having an amount data which cannot be transferred by one read command, the host apparatus 2 repetitively issues read commands. In response, the hard disk apparatus 1 sequentially reproduces AV data from the clusters specified by the host apparatus 2.
When EOF has been detected from the data in the FAT area, the decision is in step SP29 is YES, so that the host apparatus 2 goes to step SP30. For the remaining AV data up to the cluster having EOF, the host apparatus 2 sets the necessary parameters to issue a read command.
In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified in this command from the hard disk 3 in step SP31. In step SP32, the hard disk apparatus 1 temporarily stores the retrieved data in the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP33. This interrupt causes the host apparatus 2 to go to step SP34 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data temporally stored from the buffer memory 10 to the host apparatus 2 and goes to step SP35 to end this processing procedure.
Conventionally, for a file having an amount of data which cannot be transferred only single commands, a write command and a read command are issued to access the hard disk 3 for each predetermined data amount or every time the continuity of clusters is lost.
In some related-art configurations such as mentioned above, two files are processed concurrently. Referring to FIGS. 23 and 24, there are shown flowcharts indicative of a processing procedure for processing two files in a so-called multiple-write operation in which plural files are written concurrently.
In this case, the host apparatus 2 goes from step SP31 to step SP32 and, for file 1, searches the control data recorded in the host memory 2B to detect the cluster number (free cluster address) set with a code indicative of free area.
When the free cluster address has been detected, the host apparatus 2 sets this free cluster address and the transfer length as parameters for this first file in step SP33 and issues a write command having these parameters. In step SP34, the host apparatus 2 transmits the data to be recorded to the hard disk apparatus 1 by the amount specified by the transfer length. In step SP35, in response to this write command, the hard disk apparatus 1 stores the data in file 1 into the buffer memory 10. In step SP36, the hard disk apparatus 1 sequentially records the data from the buffer memory 10 to the free cluster specified by the host apparatus 2.
When the recording of the data received from the host apparatus 2 has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP37. This interrupts causes the host apparatus 2 to go to step SP38 to determined whether the data have been recorded by the predetermined amount. The predetermined data amount is set so that, when two files are alternately recorded, the buffer memory for temporarily holding these two files does not overflow or underflow, thereby preventing the continuity of the two pieces of AV data from being lost in the host apparatus 2.
If the decision is NO, the host apparatus 2 goes to step SP39 to determined whether the transfer of the data in file 1 to be recorded has all been completed. If the decision is NO, the host apparatus 2 returns to step SP32. In this case, the host apparatus 2 repetitively issues write commands until the recording of the data in one file is completed by the predetermined amount, transmitting the data to be written. In response to these write commands, the hard disk apparatus 1 sequentially records the data to the free clusters specified by the host apparatus 2.
When the recording of the AV data in file 1 has been completed by the predetermined amount, the decision in step SP38 is YES, upon which the host apparatus 2 goes from step SP38 to step SP40. The host apparatus 2 determines whether the transfer of the data in file 2 to be recorded has all been completed. If the decision is NO, the host apparatus 2 goes to step SP41.
The host apparatus 2 searches the control data recorded in the host memory 2B to detect a free cluster address set with a code indicative of free area for file 2. In step SP42, the host apparatus 2 sets this cluster address and the transfer length as parameters for this second file and issues a write command having these parameters. In step SP43, the host apparatus 2 transfers the data to be recorded to the hard disk apparatus 1 by the specified transfer length. In step SP44, in response to this write command, the hard disk apparatus 1 records the data of file 2 into the buffer memory 10. In step SP45, the hard disk apparatus 1 sequentially records the data from the buffer memory 10 to the free cluster specified by the host apparatus 2.
When the recording of the data received from the host apparatus 2 has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP46. This interrupt causes the host apparatus 2 to go to step SP47 to determined whether the data have been recorded by the predetermined amount. The predetermined amount is set under the same conditions as with the decision of step SP38 so that the continuity of the AV data in the consecutive two pieces of data is not lost in the host apparatus 2.
If the decision is NO, the host apparatus 2 goes to step SP40 to determined whether the transfer of the data to be recorded has all been completed for file 2. Thus, for file 2, the host apparatus 2 repetitively issues write commands until the recording of the data in one file has been completed by the predetermined amount, transmitting the data to be written. In response, the host apparatus 2 sequentially records the data to the free clusters specified by the host apparatus 2.
When the AV data in one file have been recorded by the predetermined data amount in response to the repetitively issued commands to the hard disk 3, the host apparatus 2 performs the same processing procedure as described above on the AV data of the other file.
When the recording has been completed as described above for file 1, the decision of step SP39 is YES, so that the host apparatus 2 goes from step SP39 to step SP49 (FIG. 24). The host apparatus 2 searches the control data recorded in the host memory 2B to detect free cluster addresses set with a code indicative of free area for file 2. In step SP50 the host apparatus 2 sets this free cluster address and the transfer length as parameters for this second file and issues a write command having these parameters. In step SP51, the host apparatus 2 transmits the data to be written to the hard disk apparatus 1 by the amount equivalent to the transfer length.
In step SP52, in response to this write command, the hard disk apparatus 1 records the data in file 2 into the buffer memory 10. In step SP53, the hard disk apparatus 1 sequentially records the data from the buffer memory 10 to the free cluster specified by the host apparatus 2.
When the recording of the data received from the host apparatus 2 has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP54. This interrupt causes the host apparatus 2 to go to step SP55 to determine whether the recording of the data in the second file has been completed. If the decision is NO, the host apparatus 2 returns to step SP49.
The host apparatus 2 repetitively issues write commands for the data in file 2. When the writing of file 2 has been completed, the decision of step SP55 is YES, so that the host apparatus 2 goes from step SP55 to step SP56 to update the data in the system entry area stored in the host memory 2B in accordance with the above-mentioned processing and update the system entry area of the hard disk 3, and then goes to step SP57 to end this processing procedure.
Conversely, if the recording of file 2 has been completed first, the decision of step SP40 is YES (FIG. 23), so that the host apparatus 2 goes from step SP40 to step SP58 (FIG. 24). The host apparatus 2 searches the control data stored in the host memory 2B to detect a free cluster address set with a code indicative of free area for file 1. In step SP59, the host apparatus 2 sets this free cluster address and the transfer length as parameters for file 1 and issues a write command having these parameters. In step SP60, the host apparatus 2 transmits the data to be recorded to the hard disk apparatus 1 by the amount equivalent to the transfer length.
In step SP61, the hard disk apparatus 1 records the data of file 1 to be transmitted in response to this write command into the buffer memory 10. In step SP62, the hard disk apparatus 1 sequentially records the data from the buffer memory 10 to the free cluster specified by the host apparatus 2.
When the recording of the data received from the host apparatus 2 has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP63. This interrupt causes the host apparatus 2 to go to step SP64 to determine whether the recording has been completed for file 1. If the decision is NO, the host apparatus 2 returns to step SP58.
The host apparatus 2 repetitively issues write commands for the data in file 1. When the writing has been completed for file 1, the decision of step SP64 is YES, so that the host apparatus 2 goes from step SP64 to step SP56 to update the data in the system entry area stored in the host memory 2B and update the system entry area of the hard disk 3, going to step SP57 to end this processing procedure.
Referring to FIGS. 25 through 28, there are shown flowcharts indicative of a processing procedure for processing two files in a so-called multiple-read operation in which plural files are read concurrently. In this case, the host apparatus 2 goes from step SP71 to SP72 and searches the control data recorded in the host memory 2B to detect the start cluster numbers from the data in the directory area for file 1 and file 2 to be read.
When these start cluster numbers are detected, the host apparatus 2 goes to step SP73 and sets the start cluster address and the transfer length as parameters for file 1 to issue a read command having these parameters.
In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this command from the hard disk 3 in step SP74. In step SP75, hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP76. This interrupt causes the host apparatus 2 to go to step SP77 and instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2.
Receiving the AV data corresponding to one read command, the host apparatus 2 determined in step SP78 whether the data have been read by the predetermined amount. This predetermined amount is set to a amount so that, when two files have been alternately read, the buffer memory of the host apparatus for temporarily storing these file does not overflow or underflow, thereby preventing the continuity of the continuous two pieces of AV data from being lost in the host apparatus 2.
If the decision is NO, the host apparatus 2 goes to step SP79 and searches the host memory 2B to detect, from the FAT area data, the next cluster address on the basis of the link cluster number of file 1. Then, in step SP80, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
If the decision is NO, the host apparatus 2 goes to step SP73 and sets the address detected in step SP78 as a parameter to issue a read command having this parameter. Thus, the host apparatus 2 repetitively issues read commands for the predetermined amount of data. In response, the hard disk apparatus 1 sequentially reproduces the AV data in file 1 on the basis of the cluster specified by the host apparatus 2, by the predetermined amount.
When the AV data in file 1 have been read by the predetermined amount, the decision of step SP78 is YES, so that the host apparatus 2 goes from step SP78 to step SP81 (FIG. 26). The host apparatus 2 searches the host memory 2B to detect, from the FAT area data, the next cluster address on the basis of the link cluster number of file 2. If the host apparatus 2 has issued no read command for file 2, the processing of step SP81 is skipped. In step SP82, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
If the decision is NO, the host apparatus 2 goes to step SP83. The host apparatus 2 sets the cluster address detected in step 81 (if no read command has been issued for file 2, the start cluster number detected in step SP72) and the transfer length as parameters to issue a read command having these parameters.
In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this command from the hard disk 3 in step SP84. In step SP85, the hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP86. This interrupt causes the host apparatus 2 to go to step SP87 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2.
Receiving the AV data corresponding to one read command, the host apparatus 2 determines whether the data have been read by the predetermined amount in step SP88. This predetermined amount is set in the same manner as with step SP78.
If the decision is NO, the host apparatus 2 goes to step SP81 and searches the host memory 2B to detect, from the FAT area data, the next cluster address based on the link cluster number of file 2. In step SP82, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
For file 2, the host apparatus 2 also repetitively issues read command for the predetermined data amount. In response, the hard disk apparatus 1 reproduces, by the specified data amount, the AV data in file 1 based on the cluster specified by the host apparatus 2.
When the AV data of one file have been read from the hard disk 3 by the specified data amount by the repetitively issued read commands, the host apparatus 2 performs the same processing procedure on the AV data of the other file, repeating the above-mentioned processing.
When EOF has been detected for file 1 by repeating the above-mentioned processing procedure, the decision is YES in step SP80 (FIG. 25), so that the host apparatus 2 goes from step SP80 to SP90. The host apparatus 2 sets parameters to issue read commands for the remaining AV data up to the cluster on which EOF is detected.
When the read command is issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by the read command from the hard disk 3 in step SP91 (FIG. 27). In step SP92, the hard disk apparatus 1 temporarily records the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP93. This interrupt causes the host apparatus 2 to go to step SP94 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2, going to step SP95.
In step S95, the host apparatus 2, upon completion of the reading, detects the next link cluster for file 2. In step SP96, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
If the decision is NO, the host apparatus 2 goes to step SP97 and sets the cluster address detected in step SP95 and the transfer length as parameters for file 2 to issue a read command having these parameters. In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this read command from the hard disk 3 in step SP98. In step SP99, hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. In step SP100, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2. This interrupt causes the host apparatus 2 to go to step SP101 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2.
Receiving the AV data corresponding to one read command, the host apparatus 2 goes to step SP95 and searches the host memory 2B to detect, from the FAT area data, the next cluster address based on the link cluster number of file 2. In step SP96, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
The host apparatus 2 repetitively issues read commands for file 2 to read the AV data from the hard disk 3. When EOF has been reached, the decision of step SP96 is YES, so that the host apparatus 2 goes to step SP102 (FIG. 29). The host apparatus 2 sets the parameters to issue read commands for the remaining AV data up to the cluster on which EOF is detected.
When the read command is issued from the host apparatus 2, the hard disk apparatus 1 reads the data specified by this read command from the hard disk 3 in step SP103. In step SP104, the hard disk apparatus 1 temporarily records the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP105. This interrupt causes the host apparatus 2 to go to step SP106 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2 and goes to step SP107 to end this processing procedure.
If file 2 has reached EOF first, the decision of step SP82 is YES (FIG. 26), the host apparatus 2 goes from step SP82 to step SP109. The host apparatus 2 sets the parameters to issue read commands on the remaining AV data up to the cluster on which EOF is detected.
In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this read command from the hard disk 3 in step SP110 (FIG. 28). In step SP111, the hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP112. This interrupt causes the host apparatus 2 to go to step SP113 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2, going to step SP115.
When the reading of file 2 has been completed, the host apparatus 2 detects the next link cluster for file 1 in step SP115. In step SP116, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
If the decision is NO, the host apparatus 2 goes to step SP117 and sets the cluster address detected in step SP115 and the transfer length as parameters to issue a read command for file 1. In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this read command from the hard disk 3 in step SP118. In step SP119, the hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. In step SP120, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2. In response, the host apparatus 2 goes to step SP121 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2.
Receiving the AV data corresponding to one read command, the host apparatus 2 goes to step SP115 and searches the host memory 2B to detect, from the FAT area data, the next cluster address based on the link cluster number of file 1. In step SP116, the host apparatus 2 determines the code based on the detected address to determine whether EOF has been reached.
The host apparatus 2 repetitively issues read commands for file 1 to read AV data from the hard disk 3. When EOF has been reached, the decision of step SP116 is YES, so that the host apparatus 2 goes to step SP122 (FIG. 29). The host apparatus 2 sets the parameters to issue read commands for the remaining AV data until the cluster on which EOF is detected.
In response to the read command issued by the host apparatus 2, the hard disk apparatus 1 reads the data specified by this command from the hard disk 3 in step SP123. In step SP124, hard disk apparatus 1 temporarily stores the retrieved data into the buffer memory 10. When the reading has been completed, the hard disk apparatus 1 causes an interrupt onto the host apparatus 2 in step SP125. This interrupt causes the host apparatus 2 to go to step SP126 to instruct the hard disk apparatus 1 for data transfer. In response, the hard disk apparatus 1 outputs the AV data from the buffer memory 10 to the host apparatus 2 and goes to step SP127 to end this processing procedure.
The recording/reproducing apparatuses of the above-mentioned type are required to transfer data at high speeds. Namely, the recording/reproducing apparatuses having high data transfer rates are applicable to the recording of AV data to record AV data of high resolutions.
Also, the recording/reproducing apparatuses having high data transfer rates can reduce the time required for dubbing. Namely, with audio equipment for example, the data transfer rate necessary at the time of data reproduction is about several hundred Kbps; if a data transfer rate of about several tens of Mbps can be provided at the time of recording, plural music files for example can be copied almost instantaneously. Therefore, in dubbing AV data, which are a result of an imaging operation, to a home server for example, a data transfer rate of about several hundred Mbps can significantly enhance the ease of use of audio equipment.
In disk storages such as hard disk, these data transfer rates are dependent on disk size, rotational speed, linear recording density, error processing, defect correction, and interface protocol. Data transfer rates are lower on hard disks of smaller size than those of larger size. Data transfer rates can be enhanced by optimizing the above-mentioned various conditions.
However, even if data transfer rates are enhanced by the optimization of these conditions, use of related-art access methods takes time for dubbing. To be more specific, when simply writing one file to a hard disk and reading one file therefrom, related-art access methods issue a command on a predetermined data amount basis and on a continuous area basis, so that commands must be repetitively issued for accessing one file. The repetitive issuance of commands takes time in the handshaking operation in interface, which lowers the data transfer rate for actually transferring AV data, making the dubbing of the AV data longer in time.
The longer dubbing time increases power dissipation.
Likewise, in the case of multiple-write and multiple-read schemes, the processing operations are alternately repeated on a predetermined data mount basis, which further increases the number of times commands are issued, making the dubbing time longer than simply dubbing two files continuously.
Further, conventional hard disk apparatuses for use as peripheral devices to personal computers are capable of random access operations. Recently, these hard disk apparatuses are increasingly small in size and high in data recording density. Therefore, various propositions are made for these hard disk apparatuses to be applied to the recording of AV data, thereby applying these hard disk apparatuses to home servers, vehicle equipment and the like.
In these hard disk apparatuses, the data recorded to a hard disk are controlled by control data recorded in the hard disk based on a cluster composed of plural sectors and this control is executed by a personal computer for example which is a host apparatus.
Now, referring to FIG. 15, there is shown a block diagram illustrating a hard disk apparatus. A hard disk apparatus 1 is connected to a host apparatus 2 which is one of various video equipment to record AV data outputted from the host apparatus 2 onto a hard disk 3. The host apparatus 2 is a video device which outputs AV data for example.
To the hard disk 3, MS-DOS compliant file system format is applied as shown in FIG. 16. Namely, the hard disk 3 is divided in the information recording surface into the inner peripheral side and the outer peripheral side, the former being allocated to a data area and latter to a system entry area. The data area is fragmented into clusters, to each of which AV data for example are recorded with a data amount of the predetermined number of frames used as a unit.
Further, the hard disk 3 is concentrically divided in the information recording surface into plural zones, each track in each zone being divided by a predetermined length along the circumference into plural sectors. In the hard disk 3 thus sectorized, physical addresses are set by the surface number of the information recording surface, the track numbers continuously allocated from the outer peripheral side of the information recording surface, and the sector numbers identifying the sectors of each track. In addition, user data are controlled in file by the logical address which are sequentially set from the outer peripheral side of the information recording surface in correspondence to these physical addresses.
Each logical address is represented in a cluster number with a cluster obtained by collecting plural logical sectors used as a unit. Namely, each logic sector provides an area corresponding to a recording unit of data which is set with the start area (located at the outermost periphery in this case) in the information recording surface defined as sector 0. In this embodiment, one physical sector corresponds to one logical sector, each logical sector number being represented in a relation that logical sector number=the number of sectors in one track×(surface number+the number of surface×track number)+sector number−1. It should be noted that surface number, track number, and sector number are based on physical address.
In this embodiment, a logical sector is configured so that data of 512 bytes are recorded to one logical sector in terms of user data and one cluster is configured by plural logical sectors. It should be noted that one cluster is generally configured by the number of sectors equal to a power of 2 and is identified by a cluster number which is a serial number starting with 2 which is the beginning of a file area in the data area to which user data are recorded.
In the data area, a cluster number is allocated to each cluster thus set and the data area is accessed on a cluster basis with reference to the cluster number. It should be noted that, in this embodiment, each cluster number is represented in 4-digit hexadecimal notation.
The system area is further divided into a boot area, a FAT (Fail Allocation Table) area, and a directory area. To the boot area, the data for defining a disk structure is recorded. To the FAT area and the directory area, the address information and so on necessary for accessing the AV data recorded in the data area are recorded.
To be more specific, the file name of each file recorded to the data area, the cluster number of the start cluster which is the recording start position of each file and the like are recorded to the directory area. To the FAT area, the cluster numbers of the clusters following the start cluster of each file are recorded. This allows the hard disk 3 to detect the addresses of consecutive clusters constituting one file by detecting the start cluster number of the desired file name from the directory area and then sequentially detecting the cluster numbers following the start cluster number from the FAT area.
As shown in FIG. 16, if file 1 is recorded to clusters having cluster numbers 1234h through 1240h in the data area, the code indicative of cluster number 1234h of a first cluster of file 1 is recorded to the directory area and the cluster numbers following this cluster number 1234h are sequentially recorded to the corresponding areas of the FAT area. It should be noted that, in FIG. 16, EOF (End Of File) is identification information indicative of the last cluster of one file.
To be more specific, the directory area records the file control data for identifying each file recorded in the data area, the file control data having a configuration shown in FIG. 17. Namely, in the file control data, the first 8 bytes are allocated to file name and the next 3 bytes are allocated to extension. The following 1 byte is allocated to attribute followed by 10 bytes allocated to data for reservation. The next 2 bytes are allocated to recording start time, followed by 2 bytes allocated to recording date and time, followed by 2 bytes allocated to cluster number which is the start cluster number. The last 4 bytes are allocated to file length.
The FAT area (FIG. 16) records the identification data indicative of the association of clusters, each of which provides a unit in which the data area is controlled. Namely, in the FAT area, cluster addresses are allocated in correspondence with the cluster numbers in the data area and the cluster numbers of the clusters following the cluster addresses are recorded. As shown in FIG. 18, of the codes which are not allocated to these cluster numbers, predetermined codes are allocated to the identification information indicative of free area, defective cluster, and EOF.
Consequently, the hard disk 3 accesses the FAT area to detect free areas in the data area. Also, the hard disk 3 executes alternative processing with reference to a defective sector. Further, at the time of recording, the hard disk 3 registers a defective sector by retry processing based on write-and-verify operation. Thus, the hard disk 3 is controlled in its information recording surface on a predetermined block basis as with the file control system applied to personal computers.
A servo circuit 4 drives a motor (M) 6 under the control of a hard disk control circuit 5 to drive the hard disk 3 at a predetermined rotational speed. Also, the servo circuit 4 drives a motor (M) 8 to cause the magnetic head to perform a seek operation and perform tracking control.
At the time of recording, a read/write data channel section 9 encodes the output data of the hard disk control circuit 5 by a scheme suited to the characteristics of the recording/reproducing system to generate bit-series data under the control of the hard disk control circuit 5, driving the magnetic head on the basis of the generated data. At the time of reading, the read/write data channel section 9 processes the reproduction signal obtained from the magnetic head to generate reproduction data, outputting them to the hard disk control circuit 5.
The hard disk control circuit 5 controls the data stored on the hard disk 3 as directed by an interface control circuit 7 and controls the operation of the servo circuit 4 in accordance with the AV data entered via a buffer memory 10 and, by outputting the AV data to the read/write data channel section 9, records sequentially the AV data to a cluster specified by the interface control circuit 7. At the time of reading, the hard disk control circuit 5 controls the operation of the servo circuit 4 to output the data from the read/write data channel section 9 to the buffer memory 10, thereby reproducing the cluster specified by the interface control circuit 7.
An interface control circuit (IF control) 7 is constituted by a SCSI (Small Computer System Interface) controller, an IDE (Intelligent Drive Electronics) controller, for example to configure an input/output circuit for inputting and outputting data and control commands to be transferred with the host apparatus 2. Namely, the interface control circuit 7 receives commands from the host apparatus 2 and interprets their parameters to control the operations of the hard disk control circuit 5 and so on. At the time of writing, the interface control circuit 7 outputs via the buffer memory 10 the AV data entered from the host apparatus 2 to the hard disk control circuit 5. On the other hand, at the time of reading, the interface control circuit 7 outputs via the buffer memory 10 the AV data received from the hard disk control circuit 5 to the host apparatus 2.
In response, the host apparatus 2 transmits various commands and so on to the hard disk apparatus 1 as directed by a user on the basis of the processing of a central processing unit (CPU) 2A for which a work area is allocated in a system memory 2B.
In this processing, at a power-on sequence, the central processing unit 2A performs a predetermined processing procedure to issue a command to the hard disk apparatus 1 so as to reproduce the control data stored in the system entry area of the hard disk 3 and records the data in the system entry area consequently outputted from the hard disk apparatus 1 to the system memory 2B. Consequently, the central processing unit 2A gets the control data recorded to the hard disk 3 and sets parameters on the basis of the control data, outputting various commands to the hard disk apparatus 1.
To be more specific, when the reproduction of a predetermined file is specified by the user, the central processing unit 2A detects the corresponding file control data from the system memory 2B to detect the start cluster number from the file control data. The central processing unit 2A also sequentially searches the data in the FAT area on the basis of the start cluster number to detect continuous cluster numbers recorded on the hard disk 3 for the file specified by the user. On the basis of a result of this detection, the central processing unit 2A sets parameters such as start cluster number and data length to issue a reproduction command. In response to the reproduction command, the hard disk apparatus 1 reproduces and outputs the data recorded to the hard disk 3. The central processing unit 2A and the hard disk apparatus 1 retrospectively follow the recordings of the control data on a predetermined data length basis to repeat the issuance of commands and the reproduction of data, thereby reproducing the file specified by the user.
When the recording of data is specified by the user, the central processing unit 2A sequentially follows the data in the FAT area recorded in the system memory 2B to detect a free area and sets parameters for recording data to the clusters in the detected free area, issuing a write command. In response to this write command, the hard disk apparatus 1 records the sequentially entered data to the hard disk 3. The central processing unit 2A and the hard disk apparatus 1 retrospectively follow the recordings of the control data on a predetermined data length basis to repeat the issuance of commands and the recording of data, thereby recording the file specified by the user.
When the recording of a file has been completed as described above, the central processing unit 2A updates the recording of the system memory 2B so as to make the recording of the system memory 2B correspond to the recording of this file and instructs the hard disk apparatus 1 to update the system entry area so as to make the system entry area correspond to the recording of the system memory 2B, thereby newly reproducing of the file recorded as described.
Hard disk apparatuses have a problem of reduced access speed due because it takes time to start the reproduction of data recorded to a hard disk after a seek operation starts (this time is hereinafter referred to as a seek time).
To be more specific, the reproduction of data in a desired cluster by a seek operation in a hard disk apparatus requires the hard disk apparatus to wait from the positioning of the magnetic head to a target track to the scanning of a target cluster by the magnetic head. Therefore, a total time of the time required for moving to the target track (this time is referred to as a seek time) and the time necessary for the scanning of the target cluster (this time is referred to as a rotational delay time) is required for each seek operation.
In hard disk apparatuses, the seek time is as short as about several milliseconds in general. However, if many files are recorded over plural areas in a scattered manner as a result of the repetitive recording/reproducing and editing operations, the time necessary for seek operations becomes not negligible, thereby substantially lowering the transfer rate of the data reproduced from the hard disk, which in turn significantly lowers access speed.
One of the methods to overcome the above-mentioned problem is to access the hard disk by command queuing for example. In this method, the hard disk is sequentially accessed from a reproduction start position nearer than the current position of the magnetic head and the reproduced data are sorted by buffering before being outputted. This method shortens seek time as compared with the access method in which the hard disk is sequentially accessed. However, this method presents a problem of a complicated control mechanism and shortens the seek time only slightly of the time required for an entire seek time, thereby limiting the enhancement in access speed.
Another problem with hard disk apparatuses is that it takes time for them to start up. To be more specific, the hard disk starts rotating when the hard disk apparatus is powered on, the rotational speed of the hard disk is increased to a predetermined level, and then the servo mechanism such as tracking control is locked, thereby making the hard disk ready for access. This process, from power-on to readiness for access, takes about two to three seconds in general in each hard disk apparatus.
Consequently, hard disk apparatuses cannot instantaneously start the reproduction of desired files when they are connected to video equipment for reproducing AV data.
To overcome the above-mentioned problem, a method is proposed in which the hard disk is always rotated to a servo-locked state (namely, holding the hard disk in a standby state). This method, however, involves a problem of waste power dissipation. Therefore, if this method is applied to battery-driven portable equipment, their serviceable time becomes limited. Especially, if a hard disk apparatus is used as the recording unit of a portable imaging device and if the time for holding the standby state is much longer than the time for recording AV data, desired scenes may not be recorded due to the power dissipation for maintaining the standby state.